(function run(wait = 3000) {
	try {
		var timer1 = setInterval(function () {
			var deleteBtnList = document.querySelectorAll('.MuiButtonBase-root[aria-label=delete');
			if (!deleteBtnList.length) {
				clearInterval(timer);
				alert('清空完毕！');
			}
			deleteBtnList[0] && deleteBtnList[0].click();
			var timer2 = setTimeout(function () {
				var confirmBtn = document.querySelector('.MuiButton-textSecondary');
				var cancelBtn = document.querySelector(".MuiButton-textPrimary");
				cancelBtn && (cancelBtn.onclick = function () {
					clearInterval(timer1);
					clearTimeout(timer2);
					console.log(1);
					throw new Error('cancel');
					return
				})
				confirmBtn && confirmBtn.click();
			}, 1000)
		}, wait)
	} catch (err) {
		if (err.message === 'cancel') return;
		run();
	}
})()
